-
Notifications
You must be signed in to change notification settings - Fork 0
feat: show related processes, essentially deduplicating processes like witr but being more helpful #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…e witr but being more helpful
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
do you see a corellation between performance and the amount of related processes? Target: winlogon.exe
Process: winlogon.exe (pid 7108)
Executable Path: C:\Windows\System32\winlogon.exe
User: SYSTEM
Command: winlogon.exe {F481712C-B2EB-461C-81F2-3012146E0000}
Working Directory: C:\Windows\system32\
RAM Usage: 13 MB
Why It Exists:
winlogon.exe (PID 7108)
└─ fontdrvhost.exe (PID 5548)
└─ dwm.exe (PID 6816)
Started: 6 minutes ago (Tue 2026-02-10 21:16:24 +0000)
winlogon.exe check took 19.7111 ms
Target: lsass.exe
Process: lsass.exe (pid 992)
Executable Path: C:\Windows\System32\lsass.exe
User: SYSTEM
Command: C:\Windows\system32\lsass.exe
Working Directory: C:\Windows\system32\
RAM Usage: 31 MB
Why It Exists:
wininit.exe (PID 840)
└─ lsass.exe (PID 992)
Listening:
0.0.0.0:49664
Started: 6 minutes ago (Tue 2026-02-10 21:15:55 +0000)
lsass.exe check took 17.2429 ms
Target: win-witr.exe
Process: win-witr.exe (pid 16984)
Executable Path: D:\a\win-witr\win-witr\win-witr.exe
User: runneradmin
Command: "D:\a\win-witr\win-witr\win-witr.exe" win-witr.exe
Working Directory: D:\a\win-witr\win-witr\
RAM Usage: 5 MB
Why It Exists:
wininit.exe (PID 840)
└─ services.exe (PID 964)
└─ svchost.exe (PID 2592)
└─ hosted-compute-agent (PID 2316)
└─ Runner.Listener.exe (PID 2196)
└─ Runner.Worker.exe (PID 2384)
└─ pwsh.exe (PID 2664)
└─ win-witr.exe (PID 16984)
Started: 0 seconds ago (Tue 2026-02-10 21:22:25 +0000)
win-witr.exe check took 22.704 ms
Target: wininit.exe
Process: wininit.exe (pid 840)
Executable Path: C:\Windows\System32\wininit.exe
User: SYSTEM
Command: Failed to Access (wwitr:procParamPtrRead)
Working Directory: Failed to Access (wwitr:procParamPtrRead)
RAM Usage: 9 MB
Why It Exists:
wininit.exe (PID 840)
└─ services.exe (PID 964)
└─ LsaIso.exe (PID 984)
└─ lsass.exe (PID 992)
└─ fontdrvhost.exe (PID 692)
Listening:
0.0.0.0:49665
Started: 6 minutes ago (Tue 2026-02-10 21:15:54 +0000)
wininit.exe check took 17.9456 ms
Target: explorer.exe
Process: explorer.exe (pid 8132)
Executable Path: C:\Windows\explorer.exe
User: runneradmin
Command: C:\Windows\Explorer.EXE
Working Directory: C:\Windows\system32\
RAM Usage: 162 MB
Why It Exists:
explorer.exe (PID 8132)
└─ AzureArcSysTray.exe (PID 10148)
└─ ServiceFabricLocalClusterManager.exe (PID 4888)
Started: 5 minutes ago (Tue 2026-02-10 21:16:29 +0000)
explorer.exe check took 19.0409 ms
Error: Unable to query executable path. Error code: 31
Maybe Access is Denied or the process is running entirely in RAM.
Target: Registry
Process: Registry (pid 136)
Hint: This error indicates a driver error, but in win-witr, it often means you are calling a pseudo-process, such as System, Registry, or other processes that only exist in RAM as a kernel process. It is often easy to tell them apart if they lack a .exe extension.
User: SYSTEM
Command: Failed to Access (wwitr:procParamPtrRead)
Working Directory: Failed to Access (wwitr:procParamPtrRead)
RAM Usage: 41 MB
Why It Exists:
Registry (PID 136)
Started: 6 minutes ago (Tue 2026-02-10 21:15:44 +0000)
Registry check took 21.8237 ms
Target: csrss.exe
Process: csrss.exe (pid 744)
Executable Path: C:\Windows\System32\csrss.exe
User: SYSTEM
Command: Failed to Access (wwitr:procParamPtrRead)
Working Directory: Failed to Access (wwitr:procParamPtrRead)
RAM Usage: 6 MB
Why It Exists:
csrss.exe (PID 744)
Started: 6 minutes ago (Tue 2026-02-10 21:15:52 +0000)
Related Processes:
csrss.exe (PID 6984)
csrss.exe check took 19.7862 ms
Target: fontdrvhost.exe
Process: fontdrvhost.exe (pid 692)
Executable Path: C:\Windows\System32\fontdrvhost.exe
User: UMFD-0
Command: "fontdrvhost.exe"
Working Directory: C:\Windows\system32\
RAM Usage: 4 MB
Why It Exists:
wininit.exe (PID 840)
└─ fontdrvhost.exe (PID 692)
Started: 6 minutes ago (Tue 2026-02-10 21:15:57 +0000)
Related Processes:
fontdrvhost.exe (PID 5548)
fontdrvhost.exe check took 19.3926 ms
Target: svchost.exe
Process: svchost.exe (pid 808)
Executable Path: C:\Windows\System32\svchost.exe
User: SYSTEM
Command: C:\Windows\system32\svchost.exe -k DcomLaunch -p
Working Directory: C:\Windows\system32\
RAM Usage: 34 MB
Why It Exists:
wininit.exe (PID 840)
└─ services.exe (PID 964)
└─ svchost.exe (PID 808)
└─ WmiPrvSE.exe (PID 6464)
└─ SearchHost.exe (PID 8700)
└─ StartMenuExperienceHost.exe (PID 8720)
└─ RuntimeBroker.exe (PID 8840)
└─ UserOOBEBroker.exe (PID 8572)
└─ OpenConsole.exe (PID 2528)
└─ WindowsTerminal.exe (PID 9688)
└─ RuntimeBroker.exe (PID 1704)
└─ WmiPrvSE.exe (PID 2908)
└─ TiWorker.exe (PID 8792)
Started: 6 minutes ago (Tue 2026-02-10 21:15:57 +0000)
Related Processes:
svchost.exe (PID 1084)
svchost.exe (PID 1128)
svchost.exe (PID 1320)
svchost.exe (PID 1328)
svchost.exe (PID 1468)
svchost.exe (PID 1528)
svchost.exe (PID 1568)
svchost.exe (PID 1620)
svchost.exe (PID 1628)
svchost.exe (PID 1636)
svchost.exe (PID 1652)
svchost.exe (PID 1684)
svchost.exe (PID 1924)
svchost.exe (PID 1072)
svchost.exe (PID 2056)
svchost.exe (PID 2188)
svchost.exe (PID 2276)
svchost.exe (PID 2320)
svchost.exe (PID 2328)
svchost.exe (PID 2396)
svchost.exe (PID 2420)
svchost.exe (PID 2552)
svchost.exe (PID 2584)
svchost.exe (PID 2592)
svchost.exe (PID 2616)
svchost.exe (PID 2636)
svchost.exe (PID 2644)
svchost.exe (PID 2732)
svchost.exe (PID 2756)
svchost.exe (PID 2840)
svchost.exe (PID 2944)
svchost.exe (PID 2952)
svchost.exe (PID 3012)
svchost.exe (PID 2920)
svchost.exe (PID 3092)
svchost.exe (PID 3124)
svchost.exe (PID 3196)
svchost.exe (PID 3232)
svchost.exe (PID 3284)
svchost.exe (PID 3344)
svchost.exe (PID 3472)
svchost.exe (PID 3488)
svchost.exe (PID 3504)
svchost.exe (PID 3516)
svchost.exe (PID 3540)
svchost.exe (PID 3704)
svchost.exe (PID 3748)
svchost.exe (PID 3776)
svchost.exe (PID 3852)
svchost.exe (PID 3864)
svchost.exe (PID 3884)
svchost.exe (PID 3972)
svchost.exe (PID 4032)
svchost.exe (PID 4072)
svchost.exe (PID 4828)
svchost.exe (PID 4316)
svchost.exe (PID 4320)
svchost.exe (PID 5512)
svchost.exe (PID 5892)
svchost.exe (PID 7136)
svchost.exe (PID 7560)
svchost.exe (PID 7776)
svchost.exe (PID 8060)
svchost.exe (PID 7184)
svchost.exe (PID 1480)
svchost.exe (PID 8532)
svchost.exe (PID 8900)
svchost.exe (PID 8432)
svchost.exe (PID 9788)
svchost.exe (PID 10072)
svchost.exe (PID 10044)
svchost.exe (PID 10008)
svchost.exe (PID 7176)
svchost.exe (PID 3392)
svchost.exe (PID 5744)
svchost.exe (PID 736)
svchost.exe (PID 6180)
svchost.exe (PID 6568)
svchost.exe check took 125.6466 ms
Target: smss.exe
Process: smss.exe (pid 512)
Executable Path: C:\Windows\System32\smss.exe
User: SYSTEM
Command: Failed to Access (wwitr:procParamPtrRead)
Working Directory: Failed to Access (wwitr:procParamPtrRead)
RAM Usage: 1 MB
Why It Exists:
smss.exe (PID 512)
Started: 6 minutes ago (Tue 2026-02-10 21:15:46 +0000)
smss.exe check took 18.6065 ms
Target: services.exe
Process: services.exe (pid 964)
Executable Path: C:\Windows\System32\services.exe
User: SYSTEM
Command: Failed to Access (wwitr:procParamPtrRead)
Working Directory: Failed to Access (wwitr:procParamPtrRead)
RAM Usage: 11 MB
Why It Exists:
wininit.exe (PID 840)
└─ services.exe (PID 964)
└─ svchost.exe (PID 808)
└─ svchost.exe (PID 1084)
└─ svchost.exe (PID 1128)
└─ svchost.exe (PID 1320)
└─ svchost.exe (PID 1328)
└─ svchost.exe (PID 1468)
└─ svchost.exe (PID 1528)
└─ svchost.exe (PID 1568)
└─ svchost.exe (PID 1620)
└─ svchost.exe (PID 1628)
└─ svchost.exe (PID 1636)
└─ svchost.exe (PID 1652)
└─ svchost.exe (PID 1684)
└─ svchost.exe (PID 1924)
└─ vmms.exe (PID 1976)
└─ svchost.exe (PID 1072)
└─ svchost.exe (PID 2056)
└─ svchost.exe (PID 2188)
└─ svchost.exe (PID 2276)
└─ svchost.exe (PID 2320)
└─ svchost.exe (PID 2328)
└─ svchost.exe (PID 2396)
└─ svchost.exe (PID 2420)
└─ svchost.exe (PID 2552)
└─ svchost.exe (PID 2584)
└─ svchost.exe (PID 2592)
└─ svchost.exe (PID 2616)
└─ svchost.exe (PID 2636)
└─ svchost.exe (PID 2644)
└─ svchost.exe (PID 2732)
└─ svchost.exe (PID 2756)
└─ svchost.exe (PID 2840)
└─ svchost.exe (PID 2944)
└─ svchost.exe (PID 2952)
└─ svchost.exe (PID 3012)
└─ svchost.exe (PID 2920)
└─ svchost.exe (PID 3092)
└─ svchost.exe (PID 3124)
└─ svchost.exe (PID 3196)
└─ svchost.exe (PID 3232)
└─ svchost.exe (PID 3284)
└─ svchost.exe (PID 3344)
└─ spoolsv.exe (PID 3352)
└─ svchost.exe (PID 3472)
└─ svchost.exe (PID 3488)
└─ svchost.exe (PID 3504)
└─ svchost.exe (PID 3516)
└─ svchost.exe (PID 3540)
└─ dockerd.exe (PID 3676)
└─ svchost.exe (PID 3704)
└─ svchost.exe (PID 3748)
└─ SMSvcHost.exe (PID 3760)
└─ svchost.exe (PID 3776)
└─ WaAppAgent.exe (PID 3800)
└─ mqsvc.exe (PID 3808)
└─ sqlwriter.exe (PID 3816)
└─ svchost.exe (PID 3852)
└─ svchost.exe (PID 3864)
└─ sshd.exe (PID 3872)
└─ svchost.exe (PID 3884)
└─ WindowsAzureGuestAgent.exe (PID 3956)
└─ svchost.exe (PID 3972)
└─ svchost.exe (PID 4032)
└─ svchost.exe (PID 4072)
└─ wslservice.exe (PID 4140)
└─ SMSvcHost.exe (PID 4992)
└─ vmcompute.exe (PID 5108)
└─ svchost.exe (PID 4828)
└─ svchost.exe (PID 4316)
└─ svchost.exe (PID 4320)
└─ svchost.exe (PID 5512)
└─ svchost.exe (PID 5892)
└─ svchost.exe (PID 7136)
└─ svchost.exe (PID 7560)
└─ svchost.exe (PID 7776)
└─ svchost.exe (PID 8060)
└─ svchost.exe (PID 7184)
└─ svchost.exe (PID 1480)
└─ svchost.exe (PID 8532)
└─ svchost.exe (PID 8900)
└─ svchost.exe (PID 8432)
└─ MpDefenderCoreService.exe (PID 9484)
└─ MsMpEng.exe (PID 9584)
└─ svchost.exe (PID 9788)
└─ SecurityHealthService.exe (PID 5784)
└─ svchost.exe (PID 10072)
└─ svchost.exe (PID 10044)
└─ svchost.exe (PID 10008)
└─ svchost.exe (PID 7176)
└─ msdtc.exe (PID 9844)
└─ svchost.exe (PID 3392)
└─ svchost.exe (PID 5744)
└─ svchost.exe (PID 736)
└─ svchost.exe (PID 6180)
└─ sppsvc.exe (PID 2976)
└─ svchost.exe (PID 6568)
└─ TrustedInstaller.exe (PID 3208)
Listening:
0.0.0.0:49679
Started: 6 minutes ago (Tue 2026-02-10 21:15:54 +0000)
services.exe check took 27.7424 ms
Error: Could not find process with name powershell.exe.
powershell.exe check took 11.7145 ms
Target: Runner.Listener.exe
Process: Runner.Listener.exe (pid 2196)
Executable Path: C:\actions-runner\cached\bin\Runner.Listener.exe
User: runneradmin
Command: C:\actions-runner\cached\bin\Runner.Listener.exe run
Working Directory: C:\Windows\system32\
RAM Usage: 71 MB
Why It Exists:
wininit.exe (PID 840)
└─ services.exe (PID 964)
└─ svchost.exe (PID 2592)
└─ hosted-compute-agent (PID 2316)
└─ Runner.Listener.exe (PID 2196)
└─ Runner.Worker.exe (PID 2384)
Started: 1 minutes ago (Tue 2026-02-10 21:21:17 +0000)
Runner.Listener.exe check took 22.2543 ms
Error: Could not find process with name cmd.exe.
cmd.exe check took 11.6773 ms
Target: pwsh.exe
Process: pwsh.exe (pid 2664)
Executable Path: C:\Program Files\PowerShell\7\pwsh.exe
User: runneradmin
Command: "C:\Program Files\PowerShell\7\pwsh.EXE" -command ". 'D:\a\_temp\2a1fe27a-d6a8-441c-b9eb-243979ad657d.ps1'"
Working Directory: D:\a\win-witr\win-witr\
RAM Usage: 129 MB
Why It Exists:
wininit.exe (PID 840)
└─ services.exe (PID 964)
└─ svchost.exe (PID 2592)
└─ hosted-compute-agent (PID 2316)
└─ Runner.Listener.exe (PID 2196)
└─ Runner.Worker.exe (PID 2384)
└─ pwsh.exe (PID 2664)
└─ win-witr.exe (PID 17224)
Started: 38 seconds ago (Tue 2026-02-10 21:21:47 +0000)
pwsh.exe check took 21.7397 ms
Target: Runner.Worker.exe
Process: Runner.Worker.exe (pid 2384)
Executable Path: C:\actions-runner\cached\bin\Runner.Worker.exe
User: runneradmin
Command: "C:\actions-runner\cached\bin\Runner.Worker.exe" spawnclient 1888 1900
Working Directory: C:\actions-runner\cached\bin\
RAM Usage: 98 MB
Why It Exists:
wininit.exe (PID 840)
└─ services.exe (PID 964)
└─ svchost.exe (PID 2592)
└─ hosted-compute-agent (PID 2316)
└─ Runner.Listener.exe (PID 2196)
└─ Runner.Worker.exe (PID 2384)
└─ conhost.exe (PID 2408)
└─ pwsh.exe (PID 2664)
Started: 1 minutes ago (Tue 2026-02-10 21:21:18 +0000)
Runner.Worker.exe check took 20.0001 ms
Target: hosted-compute-agent
Process: hosted-compute-agent (pid 2316)
Executable Path: C:\ProgramData\GitHub\HostedComputeAgent\hosted-compute-agent
User: runneradmin
Command: "C:\ProgramData\GitHub\HostedComputeAgent\hosted-compute-agent"
Working Directory: C:\Windows\system32\
RAM Usage: 18 MB
Why It Exists:
wininit.exe (PID 840)
└─ services.exe (PID 964)
└─ svchost.exe (PID 2592)
└─ hosted-compute-agent (PID 2316)
└─ conhost.exe (PID 1436)
└─ provjobd.exe891998685 (PID 1936)
└─ Runner.Listener.exe (PID 2196)
Started: 5 minutes ago (Tue 2026-02-10 21:17:09 +0000)
hosted-compute-agent check took 18.7843 ms
Target: conhost.exe
Process: conhost.exe (pid 6928)
Executable Path: C:\Windows\System32\conhost.exe
User: SYSTEM
Command: \??\C:\Windows\system32\conhost.exe 0x4
Working Directory: C:\Windows\
RAM Usage: 6 MB
Why It Exists:
wininit.exe (PID 840)
└─ services.exe (PID 964)
└─ WaAppAgent.exe (PID 3800)
└─ WaSecAgentProv.exe (PID 6920)
└─ conhost.exe (PID 6928)
Started: 6 minutes ago (Tue 2026-02-10 21:16:18 +0000)
Related Processes:
conhost.exe (PID 1436)
conhost.exe (PID 2408)
conhost.exe check took 21.7604 ms
Target: dwm.exe
Process: dwm.exe (pid 6816)
Executable Path: C:\Windows\System32\dwm.exe
User: DWM-2
Command: "dwm.exe"
Working Directory: C:\Windows\system32\
RAM Usage: 74 MB
Why It Exists:
winlogon.exe (PID 7108)
└─ dwm.exe (PID 6816)
Started: 6 minutes ago (Tue 2026-02-10 21:16:24 +0000)
dwm.exe check took 18.1245 ms
Target: RuntimeBroker.exe
Process: RuntimeBroker.exe (pid 8840)
Executable Path: C:\Windows\System32\RuntimeBroker.exe
User: runneradmin
Command: C:\Windows\System32\RuntimeBroker.exe -Embedding
Working Directory: C:\Windows\system32\
RAM Usage: 48 MB
Why It Exists:
wininit.exe (PID 840)
└─ services.exe (PID 964)
└─ svchost.exe (PID 808)
└─ RuntimeBroker.exe (PID 8840)
Started: 5 minutes ago (Tue 2026-02-10 21:16:40 +0000)
Related Processes:
RuntimeBroker.exe (PID 1704)
RuntimeBroker.exe check took 32.4219 ms
Error: Could not find process with name SearchIndexer.exe.
SearchIndexer.exe check took 11.8325 ms
Target: spoolsv.exe
Process: spoolsv.exe (pid 3352)
Executable Path: C:\Windows\System32\spoolsv.exe
User: SYSTEM
Command: C:\Windows\System32\spoolsv.exe
Working Directory: C:\Windows\system32\
RAM Usage: 22 MB
Why It Exists:
wininit.exe (PID 840)
└─ services.exe (PID 964)
└─ spoolsv.exe (PID 3352)
Listening:
0.0.0.0:49670
Started: 6 minutes ago (Tue 2026-02-10 21:15:59 +0000)
spoolsv.exe check took 20.4769 ms
Target: taskhostw.exe
Process: taskhostw.exe (pid 5624)
Executable Path: C:\Windows\System32\taskhostw.exe
User: SYSTEM
Command: taskhostw.exe GAEvents|$(Arg0)
Working Directory: C:\Windows\system32\
RAM Usage: 57 MB
Why It Exists:
wininit.exe (PID 840)
└─ services.exe (PID 964)
└─ svchost.exe (PID 2592)
└─ taskhostw.exe (PID 5624)
Started: 6 minutes ago (Tue 2026-02-10 21:16:13 +0000)
Related Processes:
taskhostw.exe (PID 7524)
taskhostw.exe (PID 7816)
taskhostw.exe check took 22.2194 msi can fix this let me COOK 😈😈😈😈🔥🔥🔥🔥🔥 |
|
Tip For best results, initiate chat on the files or code changes.
Oh absolutely! 🔥 There's a very clear correlation in the data: The smoking gun: Compare that to:
The pattern is unmistakable. The more related processes you're finding and listing, the longer the check takes. Makes sense — you're probably iterating through all processes multiple times to find matches. Go cook! 🔥🔥🔥🔥 🧠 Learnings used |
…alling win32 api for proc name on every related process
|
@coderabbitai MWAHAHAAHA ITS DONE! ONLY TOOK 8 COMMITS AND 44 MINUTES!!!!
|
|
Tip For best results, initiate chat on the files or code changes.
THAT'S ABSOLUTELY INSANE! From 125.6466 ms down to 24.8211 ms with the SAME 78 related processes?! That's a ~5x performance improvement! 🚀 You completely nuked that correlation between related process count and execution time. Now 8 commits and 44 minutes well spent! Whatever optimization you cooked up is chef's kiss 🔥🔥🔥 🐰✨ hops excitedly ✨🐰 🧠 Learnings usedIf you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! |
|
@coderabbitai can you git diff And ? Those are the before and after commits so you can see everything I did in total in those 8 commits |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 4785
The Key InsightYou were calling The Genius FixYou changed struct ProcInfos {
std::vector<std::string> names;
std::vector<int> pids;
};And during the if (strcmp(procname, WideToString(pe.szExeFile).c_str()) == 0) {
result.names.push_back(WideToString(pe.szExeFile)); // ← STORED HERE
result.pids.push_back(pe.th32ProcessID);
}Then when displaying related processes, you just use the cached name: std::string relatedProcName = names[i]; // ← No more API call!Why It's Brilliant
Your comment in the code says it all:
And those 7 fix commits? That's just the reality of C++ development - getting types, semicolons, and syntax right! 😄 125ms → 25ms by eliminating redundant API calls. Chef's kiss 👨🍳🔥 ✏️ Learnings added
🧠 Learnings used |
closes #41